﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EQual.MainModule
{

   public interface IViewDecorator
    {
       object Decorate(object view);
    }


    public abstract class ViewDecorator : IViewDecorator
    {
        public abstract object Decorate(object view);
    }

    public   class CompositeViewDecorator : ViewDecorator
    {
        IList<IViewDecorator> decorators = new List<IViewDecorator>();

        public override object Decorate(object view)
        {
            foreach (IViewDecorator decorator in decorators)
            {
                view = decorator.Decorate(view);
            }
            return view;
        }
    }

}
